package com.zian.controller.user;


import com.zian.common.R;
import com.zian.domain.dto.CarouselDTO;
import com.zian.domain.dto.PageDTO;
import com.zian.domain.po.SysCarousel;
import com.zian.domain.query.PageQuery;
import com.zian.service.ISysCarouselService;
import com.zian.validation.ValidGroup;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author
 * @since 2024-09-08
 */
@Slf4j
@Api( "轮播图接口")
@RestController("SysCarouselControllerUser")
@RequestMapping("/user/carousels")
@RequiredArgsConstructor
public class SysCarouselController {

    private final ISysCarouselService carouselService;


    @GetMapping("/list")
   @ApiOperation("分页查询")
    public R<PageDTO<SysCarousel>> queryPage() {
        PageQuery query = new PageQuery();
        query.setPageNo(1);
        query.setPageSize(10);
        log.info("分页查询参数：{}", query);
        return R.ok(carouselService.queryPage(query));
    }


}
